It does depend on what the problem is. The most common thing to
go wron on headphones is a break in the cable near the jack. To fix
this you can cut the cable and solder on a new jack.
If it is not a break in the cable near the cable it is sometimes
a cable has come loose inside the earcup... This can be tricky to
fix but be brave open them up and you may see the problem.